package com.mt.roll.core.dal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 工艺工序表
 * </p>
 *
 * @author mt
 * @since 2021-12-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_craft_process_info")
public class CraftProcessInfo extends Model<CraftProcessInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
      @TableId("id")
    private Long id;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 更新人id
     */
    @TableField("updater_id")
    private Long updaterId;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号 默认为 1
     */
    @TableField("version")
    @Version
    private String version;

    /**
     * 状态	0正在执行，1完成，2暂停，别的状态后面再添加
     */
    @TableField("status")
    private Integer status;

    /**
     * 内部编码，系统自动生成
     */
    @TableField("inter_code")
    private String interCode;

    /**
     * 编码
     */
    @TableField("code")
    private String code;

    /**
     * 工艺编码，00B下发到00A工单编码
     */
    @TableField("work_craft_no")
    private String workCraftNo;

    /**
     * 工艺名称
     */
    @TableField("craft_name")
    private String craftName;

    /**
     * 当前工序编码 00B下发到00A工单编码
     */
    @TableField("process_code")
    private String processCode;

    /**
     * 工序名称
     */
    @TableField("process_name")
    private String processName;

    /**
     * 是否为终点	0:不是，1：是
     */
    @TableField("is_process_end")
    private Integer isProcessEnd;

    /**
     * 是否为起点	0:不是，1：是
     */
    @TableField("is_process_begin")
    private Integer isProcessBegin;

    /**
     * 下一个工序编码 00B下发到00A工单编码
     */
    @TableField("next_process_code")
    private String nextProcessCode;

    /**
     * 当前设备点code，系统生成一个唯一值，例如时间戳等 00B下发到00A工单编码
     */
    @TableField("process_det_code")
    private String processDetCode;

    /**
     * 设备名称
     */
    @TableField("equipment_name")
    private String equipmentName;

    /**
     * 下一个设备编码 00B下发到00A工单编码， 如果下一个如果为空
     */
    @TableField("next_equipment_code")
    private String nextEquipmentCode;

    /**
     * 上一个设备点code
     */
    @TableField("equipment_point_code_pre")
    private String equipmentPointCodePre;

    /**
     * 下一个设备点code
     */
    @TableField("equipment_point_code_next")
    private String equipmentPointCodeNext;

    /**
     * 是否为终点	0:不是，1：是
     */
    @TableField("is_end")
    private Integer isEnd;

    /**
     * 是否为起点	0:不是，1：是
     */
    @TableField("is_begin")
    private Integer isBegin;

    /**
     * 描述
     */
    @TableField("description")
    private String description;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;


    public static final String ID = "id";

    public static final String VALID = "valid";

    public static final String CREATE_TIME = "create_time";

    public static final String CREATOR_ID = "creator_id";

    public static final String UPDATER_ID = "updater_id";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    public static final String STATUS = "status";

    public static final String INTER_CODE = "inter_code";

    public static final String CODE = "code";

    public static final String WORK_CRAFT_NO = "work_craft_no";

    public static final String CRAFT_NAME = "craft_name";

    public static final String PROCESS_CODE = "process_code";

    public static final String PROCESS_NAME = "process_name";

    public static final String IS_PROCESS_END = "is_process_end";

    public static final String IS_PROCESS_BEGIN = "is_process_begin";

    public static final String NEXT_PROCESS_CODE = "next_process_code";

    public static final String PROCESS_DET_CODE = "process_det_code";

    public static final String EQUIPMENT_NAME = "equipment_name";

    public static final String NEXT_EQUIPMENT_CODE = "next_equipment_code";

    public static final String EQUIPMENT_POINT_CODE_PRE = "equipment_point_code_pre";

    public static final String EQUIPMENT_POINT_CODE_NEXT = "equipment_point_code_next";

    public static final String IS_END = "is_end";

    public static final String IS_BEGIN = "is_begin";

    public static final String DESCRIPTION = "description";

    public static final String REMARK = "remark";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
